home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 November: Tool Chest / Dev.CD Nov 96 TC / Dev.CD Nov 96 TC.toast / Sample Code / Text / SimpleText Sample / TextFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  1.7 KB  |  59 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TextFile.h
  3.  
  4.     Contains:    Text file support for simple text application
  5.  
  6. ** Copyright 1993, 1995-1996 Apple Computer. All rights reserved.
  7. **
  8. **    You may incorporate this sample code into your applications without
  9. **    restriction, though the sample code has been provided "AS IS" and the
  10. **    responsibility for its operation is 100% yours.  However, what you are
  11. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  12. **    after having made changes. If you're going to re-distribute the source,
  13. **    we require that you make it clear in the source that the code was
  14. **    descended from Apple Sample Code, but that you've made changes.
  15.  
  16. */
  17.  
  18. #include "SimpleText.h"
  19.  
  20. #define kTextStrings             kTextBaseID
  21. #define iSpeakSelection                1
  22. #define iSpeakAll                    2
  23. #define iStationeryHelp                3
  24. #define iStationerySelectedHelp        4
  25. #define iDocumentHelp                 5
  26. #define iDocumentSelectedHelp        6
  27. #define iPictureMarker1                7
  28. #define iPictureMarker2                8
  29.  
  30. #define kTextSaveAsDialogID     kTextBaseID+1
  31. #define iTextDocumentItem        14
  32. #define iStationeryDocumentItem    15
  33. #define iTextUserItem            16
  34. #define iStationeryUserItem        17
  35.  
  36. #define kMaxLength                31*1024
  37.  
  38.  
  39. #ifndef REZ
  40.     struct TextDataRecord
  41.         {
  42.         WindowDataRecord        w;
  43.         
  44.         Boolean                    insideClickLoop;    // inside the click loop
  45.         TEClickLoopUPP            docClick;            // old click loop value
  46.         TEHandle                hTE;                // text editing area
  47.         Handle                    soundHandle;        // sound associated with this machine
  48.         
  49.         // undo support items
  50.         short                    prevCommandID;
  51.         Handle                    prevText;
  52.         Handle                    prevStyle;
  53.         short                    prevLength;
  54.         short                    prevSelStart;
  55.         short                    beforeSelStart, beforeSelEnd;
  56.         };
  57.     typedef struct TextDataRecord TextDataRecord, *TextDataPtr;    
  58. #endif
  59.